<?php if (!defined('THINK_PATH')) exit(); /*a:2:{s:74:"D:\phpstudy\PHPTutorial\WWW\farm/application/index\view\xinxi\pinglun.html";i:1555466778;s:72:"D:\phpstudy\PHPTutorial\WWW\farm/application/index\view\common\head.html";i:1555643468;}*/ ?>
<!DOCTYPE html>
<html>
  
  <head>
    <meta charset="UTF-8">
    <title>农厂汇小程序管理中心</title>
    <meta name="renderer" content="webkit">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport" content="width=device-width,user-scalable=yes, minimum-scale=0.4, initial-scale=0.8,target-densitydpi=low-dpi" />
    <link rel="shortcut icon" href="/favicon.ico" type="image/x-icon" />
    <link rel="stylesheet" href="__STATIC__/css/font.css"> 
	<link href="/favicon.ico" type="image/x-icon" rel="shortcut icon" /> 
    <link rel="stylesheet" href="__STATIC__/css/xadmin.css">
    <link href="__STATIC__/lib/layui/css/layui.css" rel="stylesheet">
    <script type="text/javascript" src="__STATIC__/js/jquery.min.js"></script>
    <script type="text/javascript" src="__STATIC__/lib/layui/layui.js" charset="utf-8"></script>
    <script type="text/javascript" src="__STATIC__/js/xadmin.js"></script>
    <!-- 让IE8/9支持媒体查询，从而兼容栅格 -->
    <!--[if lt IE 9]>
      <script src="https://cdn.staticfile.org/html5shiv/r29/html5.min.js"></script>
      <script src="https://cdn.staticfile.org/respond.js/1.4.2/respond.min.js"></script>
    <![endif]-->
    <script type="text/css">
      #fff{
        border: red solid 1px;
      }
    </script>
  </head>
  
<div class="x-nav">
      <span class="layui-breadcrumb">
        <a href="">首页</a>
        <a href="">演示</a>
        <a href="">
          <cite>评论</cite></a>
      </span>
    <a class="layui-btn layui-btn-small" style="line-height:1.6em;margin-top:3px;float:right" href="javascript:location.replace(location.href);" title="刷新">
        <i class="layui-icon" style="line-height:30px">ဂ</i></a>
</div>
<div class="x-body">
    <div class="layui-row">
        <form class="layui-form layui-col-md12 x-so" action="<?php echo Url('Xinxi/pinglun'); ?>" method="post">
            <div class="layui-input-inline">
                <select name="cateid">
                    <option value="">搜索关键词</option>
                    <option value="uname">评论用户</option>
                    <option value="sid">评论ID</option>
                    <option value="ccontent">内容</option>
                </select>
            </div>
            <input type="text" name="name"  placeholder="请输入关键词" autocomplete="off" class="layui-input">
            <span>评论时间</span><input class="layui-input" placeholder="开始日" name="datemin" id="start">至
            <input class="layui-input" placeholder="截止日" name="datemax" id="end">
            <input type="submit" name="sub" class="layui-btn" value="开始搜索" lay-submit="" lay-filter="sreach">
            <a title="导出数据" href="<?php echo url('index/xinxi/daopinglun'); ?>" >
                <span class="layui-btn">导出数据</span>
            </a>
        </form>

    </div>
    <form class="layui-form" action="">
        <table class="layui-table">
            <thead>
            <tr>
                <th>NO</th>
                <th>评论ID</th>
                <th>评论内容</th>
                <th>信息ID</th>
                <th>发布人</th>
                <th>评论时间</th>
                <th>锁定</th>
            </thead>
            <tbody>
            <?php if(is_array($rs) || $rs instanceof \think\Collection || $rs instanceof \think\Paginator): $i = 0; $__LIST__ = $rs;if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$rs): $mod = ($i % 2 );++$i;?>
            <tr>
                <td><?php echo $key+1; ?></td>
                <td><?php echo $rs['evalute_id']; ?></td>
                <td>
                    <?php if($rs['bpid']==0): ?>
                    <a title="查看" href="javascript:;" attr_id='<?php echo $rs['u_uid']; ?>' onclick="banner_edit(this)">
                        <span style="color: mediumblue"><?php if($rs['pl_name']==''): ?><?php echo $rs['pl_nickname']; else: ?><?php echo $rs['pl_name']; endif; ?></span>
                    </a>
                    &nbsp;&nbsp;:&nbsp;&nbsp;<?php echo $rs['txt']; ?>;
                    <?php else: ?>
                    <a title="查看" href="javascript:;" attr_id='<?php echo $rs['u_uid']; ?>' onclick="banner_edit(this)">
                        <span style="color: mediumblue"><?php if($rs['pl_name']==''): ?><?php echo $rs['pl_nickname']; else: ?><?php echo $rs['pl_name']; endif; ?></span>
                    </a>&nbsp;&nbsp;回复&nbsp;&nbsp;<a title="查看" href="javascript:;" attr_id='<?php echo $rs['hf_uid']; ?>' onclick="banner_edit(this)">
                    <span style="color: mediumblue"><?php if($rs['hf_name']==''): ?><?php echo $rs['hf_nickname']; else: ?><?php echo $rs['hf_name']; endif; ?></span>
                </a>&nbsp;&nbsp;<?php echo $rs['txt']; ?>;
                    <?php endif; ?>
                </td>
                <td>
                    <a title="查看" href="javascript:;" attr_id='<?php echo $rs['message_id']; ?>' onclick="banner_editxinxi(this)"><span style="color: mediumblue"><?php echo $rs['message_id']; ?></span>
                    </a>
                </td>
                <td><a title="查看" href="javascript:;" attr_id='<?php echo $rs['uid']; ?>' onclick="banner_edit(this)"><span style="color: mediumblue"><?php if($rs['uname']==''): ?><?php echo $rs['nickname']; else: ?><?php echo $rs['uname']; endif; ?></span></a></td>
                <td><?php echo $rs['create_time']; ?></td>
                <td class="td-manage">
                    <input type="checkbox" <?php if ($rs['sfig']==2): ?>  checked="" <?php endif; ?> name="status[]" lay-skin="switch" lay-filter="switchTest" lay-text="开启|关闭"/ value="<?php echo $rs['evalute_id']; ?>">
                </td>
            </tr>
            <?php endforeach; endif; else: echo "" ;endif; ?>
            </tbody>
        </table>
        <div class="page">
            <div>
                <?php echo $page; ?>
            </div>
        </div>
    </form>
</div>

<script>
    layui.use(['laydate','form'], function(){
        var laydate = layui.laydate;
        var form = layui.form;
        form.on('switch(switchTest)', function(data){
            var id = data.value;
            $.ajax({
                url: "<?php echo url('index/xinxi/pinglunflg'); ?>",
                type: "post",
                dataType: "JSON",
                data: {sid: id},
                success: function (res) {
                    if (res ==1) {
                        layer.msg('操作成功！');
                        //alert(11);
                        //location.reload();
                        return false;
                    } else {
                        layer.msg('操作失败！');
                        /*setTimeout(function () {
                            location.reload();
                        }, 1000);*/
                        return false;
                    }
                }
            });
        });


    });



    function delAll (argument) {

        var data = tableCheck.getData();

        layer.confirm('确认要删除吗？'+data,function(index){
            //捉到所有被选中的，发异步进行删除
            layer.msg('删除成功', {icon: 1});
            $(".layui-form-checked").not('.header').parents('tr').remove();
        });
    }
    function banner_edit(obj) {
        var mid=$(obj).attr('attr_id');
        // alert(mid);
        var url="<?php echo Url('user/chakan'); ?>?uid="+  mid;
        // alert(url);
        x_admin_show('查看',url);
    }

    function banner_editxinxi(obj) {
        var mid=$(obj).attr('attr_id');
        // alert(mid);
        var url="<?php echo Url('xinxi/chakan'); ?>?mid="+  mid;
        // alert(url);
        x_admin_show('查看',url);
    }

</script>

</body>

</html>